package org.xg.dao;

import java.util.List;

import org.springframework.stereotype.Repository;
import org.xg.domain.AuthorityVO;
import org.xg.domain.Role2AuthorityVO;

import com.googlecode.genericdao.search.Search;

@Repository
public class Role2AuthorityDao extends BaseDao<Role2AuthorityVO, String> {

	/**
	 * 查找角色对应的权限
	 * @param id 角色id
	 * @return
	 */
	public List<AuthorityVO> findAuthsByRoleid(String id){
		Search s = new Search();
		s.addField("auth");
		s.addFilterEqual("role.id", id);
		return this.search(s);
	}
}
